//
//  MyTableViewCell.m
//  HQJFacilitator
//
//  Created by mymac on 16/9/21.
//  Copyright © 2016年 Fujian first time iot technology investment co., LTD. All rights reserved.
//

#import "MyTableViewCell.h"

@implementation MyTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        [self addSubview:  self.titleImageView];
        [self addSubview:self.titleLabel];
        self.titleImageView.sd_layout.
        leftSpaceToView(self,15).
        topSpaceToView(self,(self.frame.size.height-18)/2).
        heightIs(18).
        widthIs(18);
        self.titleLabel.sd_layout.leftSpaceToView(self.titleImageView,10).
        topEqualToView(self.titleImageView).
        heightIs(18).
        widthIs(WIDTH-25);
    
    }
    
    
    return self;
    
}

-(UIImageView *)titleImageView {
    
    if (!_titleImageView) {
        _titleImageView = [[UIImageView alloc]init];
//        _titleImageView.frame = CGRectMake(10, 10, 20, 20);
        
    }
    return _titleImageView;
}
-(UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.font = [UIFont systemFontOfSize:17];
        _titleLabel.textColor = [UIColor blackColor];
//        _titleLabel.frame = CGRectMake(30, 10, WIDTH-30, 24);
        
    }
    
    return _titleLabel;
}






- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
